

#ifndef TRENDCHART_TEST_H
#define TRENDCHART_TEST_H

#include <QtCore>
#include <QtWidgets>
#include <QtConcurrent>
#include "CTrendChart.h"
#include "CTrendTable.h"
#include "CTrendDefine.h"
class test : public QWidget
{
    Q_OBJECT
public:
    explicit test(QWidget *widget = nullptr);
private:

    void InitUi();

    void InitEvent();

    void InitWidget();

    void InitState();

    void GenerateData(int hour);
private:
    QPushButton *customColor = nullptr;
    QPushButton *resetRange = nullptr;
    QPushButton *testLBtn = nullptr;
    QPushButton *testRBtn = nullptr;
    QPushButton *startBtn = nullptr;
    QPushButton *stopBtn = nullptr;
    QPushButton *clearBtn = nullptr;
    QPushButton *addLineBtn = nullptr;
    QPushButton *delLineBtn = nullptr;
    QComboBox * combo = nullptr;
    QTimer timer;
    QTime now;
    QString last_line;
    QStringList verHeader;
    CTrendChart chart;
    CTrendTable table;

    QSpinBox * hour = nullptr;

    TrendDataList dataSet;
};


#endif //TRENDCHART_TEST_H
